﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_AccountGetInboxID]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_AccountGetInboxID];
GO
-------------------------------------------------------------------------------
-- sproc_AccountGetInboxID
-------------------------------------------------------------------------------
CREATE PROCEDURE [dbo].[sproc_AccountGetInboxID]
(
    @userID             int ,
    @InboxID           int OUTPUT
)
AS
BEGIN
SET NOCOUNT ON;

SELECT @InboxID = FolderID FROM dbo.TabUsrMailFolder WHERE userid = @userID and FolderName = N'收件箱' and Attribute = 0;

END
GO